<%
data_fields = [:full_name,:first_name,:last_name,:age,:gender,
:locale_language,:rel_status,:email,:occupation,:role,:locality,:state,:country,:locale_country,
:full_hometown,:full_locations,:music,:movies,:interests,:books] %>
<tr>
    <td>
        <%= link_to entry[:id] || entry["id"], :controller => "medial_profile", :action => "show", :id => entry[:id] || entry["id"] %>
    </td>
    <td>
        <%= entry[:user_id] || entry["user_id"] %>
    </td>
    <td>
        <%= entry[:service_count] || entry["service_count"] %>
    </td>
    <% data_fields.each do |d| %>
    <td>
        <%
        entry[d] || entry[d.to_s]
        msg = nil
        prob_dist = entry[d] || entry[d.to_s]
        #        msg = csv_to_prob_record(prob_dist)
        if !(prob_dist.nil? || prob_dist.eql?("")) then
			options = csv_to_prob_record(prob_dist)
			#options = csv_to_prob_record(prob_dist).sort {|a,b| b[1] <=> a[1]}
			#if options[0][0].eql?("top") then
			#	top = options.pop
			#	options << top
			#end
        msg = "<select>\n"
        options.each { |o|
			value = "&lt;#{o[0]},#{sprintf "%.4f", o[1].to_f}&gt;"
			msg.concat "<option value=\"#{value}\">#{value}</option>"
		}
        msg.concat "</select>\n"
        end %>
        <%= msg %>
    </td>
    <% end %>
</tr>
